//
//  FCSDKMethodDefine.h
//  FCPackage
//
//  Created by ZhouYou on 2022/4/7.
//

#ifndef FCSDKMethodDefine_h
#define FCSDKMethodDefine_h

//根据RGB值获取颜色
#define FCSDKColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

//根据RGB值和alpha值获取颜色
#define FCSDKColor_RGB_Alpha(rgbValue,i) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:(i)]

//weak self
#define FCWS(weakSelf)  __weak __typeof(&*self)weakSelf = self

#define FCFORMAT(fmt,...)[NSString stringWithFormat:fmt,##__VA_ARGS__]

#define FCBundle(bundle)    [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:(bundle) ofType:@"bundle"]]

#define kFC_GETIMGAlways(a)  [[UIImage imageNamed:a] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]

#define FCSDKKey_User_AccessKey            @"FCSDKKey_User_AccessKey"
#define FCSDKKey_User_SaasDomain           @"FCSDKKey_User_SaasDomain"
#define FCSDKKey_User_Fout                 @"FCSDKKey_UserFoutkey" //正文字体缓存key

#endif /* FCSDKMethodDefine_h */
